<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ehcarts</title>
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/zh/asset/theme/dark.js"></script>
    <style>
        html, body {
            padding: 0;
            margin: 0;
            width: 100%;
            height: 100%;
        }
        .container {

            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
<div class="container"></div>
<script src="dashboard.js"></script>
<script>
    /**
     * 基本组件
     */
    let init = echarts.init(document.querySelector('.container'), 'dark');
    init.setOption(option);
    let timeout = null;
    window.onresize = () => {
        if (timeout != null) {
            clearTimeout(timeout);
        }
        timeout = setTimeout(() => init.resize(), 500);

    }
</script>
</body>
</html>